package thethree;
import java.util.*;
public class test3 {
	static int application(String a) {
		System.out.println(a);
		//判断是否为大写
		if(a.charAt(0)>='A'&&a.charAt(0)<='Z') {
			int count=0;
			for(int i=0;i<a.length();i++) {
				if(a.charAt(i)>='A'&&a.charAt(i)<='Z') {
					count++;
				}
			}
			return count;
		}else 
		System.out.println("不合适");
		return 0;
	}
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		//输入字符串a
		System.out.println(application(a));
	}
	
}
